1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"824.44">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
; color: #98281a}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
; min-height: 14.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
; color: #bf0000}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
; color: #0023b2; min-height: 14.0px}
18 span
.s1
{color: #0000ff}
19 span
.s2
{font: 10.0px Monaco
}
20 span
.s3
{color: #0023b2}
21 span
.s4
{color: #000000}
22 span
.s5
{color: #0000bf}
23 span
.s6
{color: #606060}
24 span
.Apple-tab-span
{white-space:pre
}
28 <p class=
"p1"><b>Using the Startup File
</b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p3">Once the class library is finished compiling the interpreter looks for a file at an operating system dependent path and if such a file exists, executes any code within it. (This happens within
<a href=
"../Core/Kernel/Main.html"><span class=
"s1">Main
</span></a>-startup.) By creating a file in this location you can make user specific customizations.
</p>
31 <p class=
"p2"><br></p>
32 <p class=
"p3">- On
<b>Mac OS X
</b> the path is either
<span class=
"s2">"/Library/Application Support/SuperCollider/startup.rtf"</span> (i.e. a system-wide file) or
<span class=
"s2">"~/Library/Application Support/SuperCollider/startup.rtf"</span> (i.e. a user-specific file). Both files can be used, where the system-wide file is executed before the user-specific file.
<br>
33 - On
<b>Linux
</b> the path is
<span class=
"s2">"~/.sclang.sc"</span><br>
34 - On
<b>Windows
</b> the file is
<span class=
"s2">"startup.sc"</span> and needs to be in the same directory as PsyCollider
</p>
35 <p class=
"p2"><br></p>
36 <p class=
"p3">A common example would be to alter the options of the local and internal Servers:
</p>
37 <p class=
"p4">// placing the following code in the file will cause these modifications to be made
</p>
38 <p class=
"p4">// at startup (see also:
<a href=
"../ServerArchitecture/ServerOptions.html"><span class=
"s1">ServerOptions
</span></a>)
</p>
39 <p class=
"p5"><br></p>
40 <p class=
"p4"><span class=
"s3">Server
</span><span class=
"s4">.local.options.numOutputBusChannels =
4;
<span class=
"Apple-tab-span"> </span></span>// change number of input and output channels
</p>
41 <p class=
"p6"><span class=
"s3">Server
</span>.local.options.numInputBusChannels =
4;
</p>
42 <p class=
"p6"><span class=
"s3">Server
</span>.internal.options.numOutputBusChannels =
4;
</p>
43 <p class=
"p6"><span class=
"s3">Server
</span>.internal.options.numInputBusChannels =
4;
</p>
44 <p class=
"p5"><br></p>
45 <p class=
"p7"><span class=
"s5">Server
</span><span class=
"s4">.local.options.device =
</span><span class=
"s6">"Built-in Audio"</span><span class=
"s4">;
<span class=
"Apple-tab-span"> </span></span>// use a specific soundcard
</p>
46 <p class=
"p6"><span class=
"s5">Server
</span>.local.options.device =
<span class=
"s6">"MOTU Traveler"</span>;
</p>
47 <p class=
"p6"><span class=
"s5">Server
</span>.local.options.device =
<span class=
"s6">"TASCAM US-122"</span>;
</p>
48 <p class=
"p6"><span class=
"s5">Server
</span>.local.options.device =
<span class=
"s6">"Jack Router"</span>;
</p>
49 <p class=
"p7"><span class=
"s5">Server
</span><span class=
"s4">.local.options.device =
</span><span class=
"s5">nil
</span><span class=
"s4">;
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// use the system default soundcard
</p>
50 <p class=
"p8"><br></p>
51 <p class=
"p4"><span class=
"s3">Server
</span><span class=
"s4">.local.options.blockSize =
128;
</span>// increase block size (default is
64)
</p>
52 <p class=
"p6"><span class=
"s3">Server
</span>.internal.options.blockSize =
128;
</p>
53 <p class=
"p5"><br></p>
54 <p class=
"p4"><span class=
"s3">Server
</span><span class=
"s4">.local.options.sampleRate =
96000;
</span>// increase sampling rate (if your hardware supports it)
</p>
55 <p class=
"p6"><span class=
"s3">Server
</span>.internal.options.sampleRate =
96000;
</p>
56 <p class=
"p7"><span class=
"s5">Server
</span><span class=
"s4">.internal.options.sampleRate =
</span><span class=
"s5">nil
</span><span class=
"s4">;
<span class=
"Apple-tab-span"> </span></span>// use the currently selected samplerate of the soundcard
</p>
57 <p class=
"p5"><br></p>
58 <p class=
"p4">// change the standard synthDef directory to a custom one:
</p>
59 <p class=
"p6"><span class=
"s3">SynthDef
</span>.synthDefDir =
<span class=
"s6">"~/scwork/synthdefs"</span>.standardizePath;
</p>
60 <p class=
"p5"><br></p>
61 <p class=
"p4">// change the standard archive path to a custom one:
</p>
62 <p class=
"p6"><span class=
"s3">Archive
</span>.archiveDir =
<span class=
"s6">"~/scwork"</span>.standardizePath;
</p>
63 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
64 <p class=
"p3">Naturally the file must contain only valid SC expressions.
</p>